const arr = [
  {
    dictId: 1951,
    dictPid: 0,
    dictName: "幼儿护理",
    dictDescribe: "",
    createTime: "",
    updateTime: "",
    sysType: 0,
    ifValid: 0,
    sort: 0,
  },
  {
    dictId: 1952,
    dictPid: 0,
    dictName: "心理梳理",
    dictDescribe: "",
    createTime: "",
    updateTime: "",
    sysType: 0,
    ifValid: 0,
    sort: 0,
  },
  {
    dictId: 1953,
    dictPid: 0,
    dictName: "产康护理",
    dictDescribe: "",
    createTime: "",
    updateTime: "",
    sysType: 0,
    ifValid: 0,
    sort: 0,
  },
  {
    dictId: 1954,
    dictPid: 0,
    dictName: "老人照顾",
    dictDescribe: "",
    createTime: "",
    updateTime: "",
    sysType: 0,
    ifValid: 0,
    sort: 0,
  },
];

const selectList = [
  {
    empId: 235,
    skillId: 1953,
  },
  {
    empId: 235,
    skillId: 1954,
  },
];

const selectList2 = [
  { checked: false, empId: 235, skillId: 1953 },
  { checked: true, empId: 235, skillId: 1954 },
];

const doSelect = (arr1, selectedList1) => {
  const arr = JSON.parse(JSON.stringify(arr1));
  const selectedList = JSON.parse(JSON.stringify(selectedList1));
  return arr.map((e) => {
    let checked = false;
    if (selectedList.find((v) => v.skillId === e.dictId)) {
      checked = true;
    }
    return {
      ...e,
      checked,
    };
  });
};

console.log(doSelect(arr, selectList));
